function v=f5_getValueAsF4(data, k, n)
    if nargin ~= 3
        error 'number of arguments must be 3: v = f5_getValueAsF4(data, k, n)'
    end
    if size(data,2) ~= n
        error 'size of data != n'
    end
    v = uint8(zeros(1,k));
    for i = 1:n
        if data(1,i) >= 0
            p = mod(data(1,i), 2);
        else
            p = 1-mod(data(1,i), 2);
        end
        u = uint16(i);
        for j = 1:k
            if bitget(u, j) ~= 0
                v(1,j) = bitxor(v(1,j), p);
            end
        end
    end
end
